package com.cmower.baeldung.hashmap1;

/**
 * @author 沉默王二，一枚有趣的程序员
 */
public class HashMapIndexDemo {
    public static void main(String[] args) {
String [] keys = {"沉","默","王","二"};
for (String k : keys) {
    int hasCode = k.hashCode();
    int right = hasCode >>> 16;
    int hash = hasCode ^ right;
    int i = (16 - 1) & hash;
    System.out.println(hash + " 下标：" + i);
}
    }
}
